package org.keqinglee.study.map;

/**
 * @author: keqinglee
 * @date: 2021/9/30 11:46
 */
public class HashMap {

    public static void main(String[] args) {

        //Integer.numberOfLeadingZeros()

        int n = 4;
        System.out.println("原始数值");
        System.out.println(Integer.toBinaryString(n));

        n |= n >>> 1;
        System.out.println("右移1位");
        System.out.println(Integer.toBinaryString(n));

        n |= n >>> 2;
        System.out.println("右移2位");
        System.out.println(Integer.toBinaryString(n));

        n |= n >>> 4;
        System.out.println("右移4位");
        System.out.println(Integer.toBinaryString(n));

        n |= n >>> 8;
        System.out.println("右移8位");
        System.out.println(Integer.toBinaryString(n));

        n |= n >>> 16;
        System.out.println("右移16位");
        System.out.println(Integer.toBinaryString(n));
        System.out.println("n=" + n);
    }

}
